﻿#pragma once

#if defined(_MSC_VER)
    #define _CRT_SECURE_NO_WARNINGS
#endif

// 包含头文件
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <ctype.h>
#include <stdbool.h>



// 外部函数声明
extern double square_root(double x);
extern void swap(float* a, float* b);
extern int* prime_numbers(int start, int end);
extern int leap_years(int start, int end);
extern int binary_search(int* arr,  // 数组的首地址
                         int left, int right, int key);
extern int add_add_num(int* num);
extern int test_decimal_to_fraction(double decimal);

extern int nest();

extern void reverse1(unsigned int num);
extern void reverse2(unsigned int num);

extern int str_len1(char* str);
extern int str_len2(char* str);

extern int* factorial1(int n);
extern int factorial2(int n);

extern int fibonacci1(int n);
extern int fibonacci2(int n);

extern float max_all_num(float* arr, int size);
extern void print_multiplication_table(int num);
extern void factorial_array(int n);
extern int strlen_test1(const char* str);
extern int strlen_test2(char* str);
extern void reverse_str1(char* str);
extern int reverse_str2(char str[], int start, int end);
extern void reverse_str3(char* str);
extern int digit_sum(unsigned int num);
extern int power_int(int n, int k);
extern double power_double(double n, int k);


// 可变参数
extern void test_va_args();



// 宏定义部分
#define print_start_line(start_str) printf("---------- %s ----------\n", start_str)
#define print_end_line(end_str) printf("---------- %s ----------\n\n\n", end_str)
